<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'index.jsp' starting page</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/AFLAX/aflax.js"></script>  
	<script type="text/javascript">
	     
	    $(function(){
		    var aflax = new AFLAX("${pageContext.request.contextPath}/js/AFLAX/aflax.swf");   
		    var connection = null;  
	        connection = new AFLAX.Socket(aflax, "127.0.0.1", 8899,   
	                "onConnectEvent", "onDataEvent", "onCloseEvent");             
	    });
	  	
	    function onConnectEvent(val)    
	    {    
	        console.log(val);  
	    }    
	        
	    function onDataEvent(str)    
	    {    
	        console.log(str);   
	    }    
	        
	    function onCloseEvent()    
	    {    
	        console.log("the connection is already closed");   
	    }  
	    function go1(){  
	    }  
	</script> 
</head>
  <body>
    <li><a href="javascript:void(0);" onclick="go()">go</a></li>
	<li><a href="chat02.xhtml">chat02</a></li>
	
	
</body>

</html>